home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 2_5.lha / 2_5 / 2_5b_b.c < prev    next >
Text File  |  1993-08-08  |  435b  |  23 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / print all printable characters portably
  6. / version 2
  7. include <limits.h>
  8. include <stream.h>
  9. include <ctype.h>
  10.  
  11. oid pr(int i)    // same pr() as before
  12.  
  13.    cout << chr(i) << " " << i << "\n";
  14.  
  15.  
  16. nt main(int, char**)
  17.  
  18.    for (int i = 0; i <= CHAR_MAX; i++)
  19. if (isprint(i))
  20.     pr(i);
  21.    return 0;
  22.  
  23.